#pragma once
extern "C" {
#include <libswscale/swscale.h>
#include <libavutil/opt.h>
#include <libavutil/imgutils.h>
}
class Swscale
{
public:
	Swscale(AVPixelFormat src_pixfmt, int src_w, int src_h, AVPixelFormat dst_pixfmt,int dst_w, int dst_h);
	~Swscale();
private:
	struct SwsContext *img_convert_ctx;
	//src
	AVPixelFormat m_src_pixfmt;
	int m_src_w;
	int m_src_h;
	uint8_t *m_src_data[4];
	int m_src_linesize[4];
	//dst
	AVPixelFormat m_dst_pixfmt;
	int m_dst_w;
	int m_dst_h;
	uint8_t *m_dst_data[4];
	int m_dst_linesize[4];

};

